package com.cskaoyan.market.vo;

import com.cskaoyan.market.db.domain.MarketCategory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CategoryVo {
    int id;
    String name;
    String keywords;
    String desc;
    String iconUrl;
    String picUrl;
    String level;
    List<CategoryVo> children;

    public CategoryVo(int id) {
        this.id = id;
    }
    public CategoryVo(MarketCategory category){
        this.id=category.getId();
        this.name=category.getName();
        this.keywords=category.getKeywords();
        this.desc=category.getDesc();
        this.iconUrl=category.getIconUrl();
        this.picUrl= category.getPicUrl();
        this.level=category.getLevel();
    }
}
